FROM registry.cn-hangzhou.aliyuncs.com/chofn/php-base73:v2.0

MAINTAINER 310255981@qq.com

#crontab
#将root文件添加到 /var/spool/cron/crontabs/ 下
ADD ./cron/root /var/spool/cron/crontabs/root

RUN php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \
    && composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ \
    && chown -R root:crontab /var/spool/cron/crontabs/root \
    && chmod 600 /var/spool/cron/crontabs/root \
    && touch /var/log/cron.log

ADD ./entrypoint.sh /var/www/html/entrypoint.sh

ENTRYPOINT ["/usr/bin/supervisord","-c", "/etc/supervisor/supervisord.conf"]